<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Show Banner</title>
<link href="../Public/css/index.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function deleteBanner(id) {
	if(confirm('确定要删除照片吗?')) {
		window.location="__URL__/deleteBanner/id/"+id; 
	}
}
function uploadCheck() {
	var filepath = document.getElementById("uploadBanner").value;
    if(filepath==""){
    	alert("请选择上传的文件！");
    	return false;
  	}
    var extname = filepath.substring(filepath.lastIndexOf(".")+1,filepath.length);
    extname = extname.toLowerCase();//处理了大小写
    if(extname!= "jpg"){
     	alert("只能上传jpg格式的图片！");
      	return false;
     }
    return true;
}
function setUrl(photoid) {
	var url = document.getElementById(photoid).value;
	window.location="__URL__/setUrl/photoid/"+photoid+"/url/"+url; 
}
</script>
</head>
<body>
<div id="right_font"><img src="../Public/images/main/main_14.gif"
	alt="" /> 您现在所在的位置：<a href="__GROUP__/Index/main" target="mainFrame">首页</a> → 会员展示  → <span
	class="bfont">{$navi}</span></div>
<form action="uploadBanner" enctype="multipart/form-data" method="post" onsubmit='return uploadCheck();'>
<div id="info_main">
	<div id="info_main_img"><img
		src="../Public/images/main/main_14.gif" alt="" /><span
		class="adminfont">&nbsp;&nbsp;{$title}</span></div>	
	<div id="member_info_upfile">上传文件： 
		<input type="file" name="uploadBanner" id="uploadBanner"/> 
		<select name='type' id='pic_type'>
			<option value='img01'>大图1</option>
			<option value='img02'>大图2</option>
			<option value='img03'>大图3</option>
			<option value='img04'>大图4</option>
			<option value='img05'>大图5</option>
			<option value='bt1'>小图1</option>
			<option value='bt2'>小图2</option>
			<option value='bt3'>小图3</option>
			<option value='bt4'>小图4</option>
			<option value='bt5'>小图5</option>
		</select>
		<input type="submit" value="上传" />
		<span class="member_image_notice">*点击图片可查看大图，上传文件格式为jpg文件，大图大小为695*440，小图大小为195*85。</span>
	</div>	
	<div id="member_info_image"><h3>&nbsp;&nbsp;小图</h3>
		<volist name="labellist" id="label">
		<div id="member_photo" class="label">
			<a href="{$label.photo_url}" target=_blank>
			<img src="{$label.photo_url}"
			width="97px" height="42px" /></a><br />	
			<span class="member_image_font">[<a onclick="deleteBanner('{$label.photo_id}')">删除</a>]</span>
		</div>
		</volist>
	</div>
	<div id="member_info_image"><h3>&nbsp;&nbsp;大图</h3>
		<volist name="bannerlist" id="banner">
		<div id="member_photo" class="banner">
			<a href="{$banner.photo_url}" target=_blank>
			<img src="{$banner.photo_url}"
			width="139px" height="88px" /></a><br />	
			<span class="member_image_font">[<a onclick="deleteBanner('{$banner.photo_id}')">删除</a>]</span>
		</div>
		</volist>
	</div>
	<div id="member_info_image"><h3>&nbsp;&nbsp;大图链接</h3>
		<volist name="bannerlist" id="banner">
		<span class="member_image_font">链接:</span>
		<input type="text" id="{$banner.photo_id}" style ="width:260px" value="{$banner.user_id}" />
		<input type="button" onclick="setUrl('{$banner.photo_id}')" value="修改" /><br />
		</volist>
	</div>
</div>		
</form>	
</body>
</html>